import request from '../utils/request'

// 搜索页 - 获取联想菜单（搜索建议）列表
const getSearchSuggListAPI = ({ keyword }) => {
  return request({
    method: 'GET',
    url: '/v1_0/suggestion',
    params: {
      q: keyword
    }
  })
}

// 搜索页 - 获取搜索结果列表
const getSearchResultListAPI = ({ keyword, page = 1 }) => {
  return request({
    method: 'GET',
    url: '/v1_0/search',
    params: {
      q: keyword,
      page
    }
  })
}

export {
  getSearchSuggListAPI,
  getSearchResultListAPI
}
